﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebApi.Models
{
    public class ErrorCodeUtil
    {
        public static string getCodeMessage(int code)
        {
            string fhz = "";
            switch (code)
            {
                case 40037:
                    fhz = "template_id不正确";
                    break;
                case 41028:
                    fhz = "form_id不正确，或者过期";
                    break;
                case 41029:
                    fhz = "form_id已被使用";
                    break;
                case 45009:
                    fhz = "接口调用超过限额";
                    break;
                case 105:
                    fhz = "该卡座已被处理";
                    break;
                case 0:
                    fhz = "成功";
                    break;
                case -1:
                    fhz = "服务器出现异常";
                    break;
                case -2:
                    fhz = "卡座已被预订不可关闭";
                    break;
                case -3:
                    fhz = "账号不存在";
                    break;
                case -4:
                    fhz = "参数错误";
                    break;
                case -5:
                    fhz = "订单不存在";
                    break;
                case -6:
                    fhz = "商家不存在";
                    break;
                case -7:
                    fhz = "订单添加成功，通知发送失败";
                    break;
                case -8:
                    fhz = "获取微信openid失败";
                    break;
                case -9:
                    fhz = "操作失败";
                    break;
                case -11:
                    fhz = "您收藏过该商家";
                    break;
                case -12:
                    fhz = "上传文件不能为空";
                    break;
                case -13:
                    fhz = "上传文件大小超过限制";
                    break;
                case -14:
                    fhz = "不支持上传文件类型";
                    break;
                case -15:
                    fhz = "卡座信息异常";
                    break;
                case -16:
                    fhz = "您已预定该卡座请勿重复提交";
                    break;
                case -17:
                    fhz = "订单已被处理";
                    break;
                case -18:
                    fhz = "超过两分钟订单状态异常";
                    break;
                case -19:
                    fhz = "账户余额不足";
                    break;
                case -20:
                    fhz = "活动不存在";
                    break;
                case -21:
                    fhz = "余票不足";
                    break;
                case -22:
                    fhz = "账户余额不足或未绑定提现账号";
                    break;
                case -110:
                    fhz = "appToken失效";
                    break;
                default:
                    fhz = "服务器异常";
                    break;
            }
            return fhz;
        }
    }
}